# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
pkgname=lua-resty-openssl
pkgver=0.8.22
pkgrel=0
pkgdesc="FFI-based OpenSSL binding for OpenResty"
url="https://github.com/fffonion/lua-resty-openssl"
# ppc64le, riscv64: no luajit/openresty
# armhf, armv7, s390x, x86: failing tests
arch="aarch64 x86_64"
license="BSD-2-Clause"
depends="
	libcrypto3
	libssl3
	luajit
	"
checkdepends="
	bash
	openresty
	perl-test-harness-utils
	perl-test-nginx
	"
source="https://github.com/fffonion/lua-resty-openssl/archive/refs/tags/$pkgver/lua-resty-openssl-$pkgver.tar.gz"

check() {
	prove -r t
}

package() {
	mkdir -p "$pkgdir/usr/share/lua/common"
	cp -r ./lib/resty "$pkgdir/usr/share/lua/common"
}

sha512sums="
02d9542d716a9dd9c319a2cb5228b0461dd5c8fee9650e7f87f3c8f4c115677fcb1cea208d4e4105882198b6f6a9afe8896140b6ffb6c6200701d6d4a47813cd  lua-resty-openssl-0.8.22.tar.gz
"
